import {createRouter, createWebHashHistory} from 'vue-router'

const routes = [
    {
        path: "/",
        name: "home",
        // component: () => import("@/components/TheWelcome.vue")
        component: () => import("@/views/HomeView.vue")
    },
    {
        path: "/login",
        name: "login",
        component: () => import("@/views/LoginView.vue")
    },
    {
        // 电影详情页面 /movie?id=123
        path: "/movie",
        name: "movie",
        component: () => import("@/views/MovieView.vue")
    },
    {
        // 搜索页面 /search?name=xxx
        path: "/search",
        name: "search",
        component: () => import("@/views/SearchView.vue")
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router